package flc.ast.adapter;

import android.graphics.Color;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;
import stark.common.bean.StkResBean;

public class TextAdapter extends StkProviderMultiAdapter<StkResBean> {

    public TextAdapter() {
        addItemProvider(new StkSingleSpanProvider(126));
        addItemProvider(new TextProvider());
    }

    private class TextProvider extends BaseItemProvider<StkResBean> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_text;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, StkResBean bean) {
            baseViewHolder.setText(R.id.tvTextItemContent, bean.getDesc());
        }
    }

}
